package com.ruoyi.index.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.index.dto.GoodsCategoryDto;
import com.ruoyi.index.dto.GoodsDto;
import com.ruoyi.index.service.GoodsService;
import com.ruoyi.index.mapper.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
* @author dell
* @description 针对表【ml_goods(商品表)】的数据库操作Service实现
* @createDate 2025-03-19 14:11:45
*/
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, GoodsDto>
    implements GoodsService{
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public List<GoodsDto> selectGoods(Integer goodsStatus) {
        QueryWrapper<GoodsDto> qr = new QueryWrapper<>();
        qr.eq("goods_status",goodsStatus);
        return goodsMapper.selectList(qr);
    }
}




